home *** CD-ROM | disk | FTP | other *** search
- {$APPTYPE CONSOLE}
- uses
- TBOBSMTP;
- begin
- writeln('content-type: text/html');
- writeln;
- writeln('<HTML>');
- writeln('<BODY>');
- writeln('<PRE>');
- with TBSMTP.Create(nil) do
- try
- MailServer := 'mail.server.com'; { insert your own SMTP mailhost here }
- MessageFrom := 'RobotBob';
- MessageTo := 'bob@drbob.demon.nl';
- MessageSubject := 'Automatic E-mail using SMTP';
- MessageText.Add('Hi Bob,');
- MessageText.Add('');
- MessageText.Add('It looks like this is really working, eh?');
- MessageText.Add('(and this time we sent it from the server)');
- MessageText.Add('');
- MessageText.Add('Groetjes,');
- MessageText.Add(' Bob Swart (aka Dr.Bob - www.drbob42.com)');
- SendMail;
- finally
- Free;
- writeln('</PRE>');
- writeln('</BODY>');
- writeln('</HTML>')
- end
- end.
-